/* 
 * Copyright (C) 2006 Sasa Coh <sasacoh@gmail.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
 */


namespace MenuDesigner {

  public enum ESymbol
  {
    arrow,
    link,
    check
  }

  /**
   * @class CObserver
   *
   * @brief Interface for rendering display.
   *
   * @author Sasa Coh
   */
  public interface CObserver 
  {

    /*---------------------------------------
     * Framework drawing methods
     *---------------------------------------*/

    void clearScreen();

    void drawText(int posY, string caption, EAlignment justify);
    void drawText(int posX, int posY, string caption);
    void drawTextBox(int posY, int lines, string caption, EAlignment alignmode);
    void drawEdit(int posY, string prompt, string caption, int cursor_position, bool selected, EEditMode mode);
    void drawLink(int posY, string caption, EAlignment justify);
    void drawScroller(int posY, int scrollposition, int scrollSize);
    void drawCheckBox(int posY, string caption, EAlignment justify, bool ischecked);
    void drawEditBox(int posY, int lines, string prompt, string caption, int cursor_position, bool selected, EEditMode mode);

    void eraseText(int posY, string caption, EAlignment justify);
    void eraseText(int posX, int posY, string caption);
    void eraseTextBox(int posY, int lines, string caption, EAlignment alignmode);
    void eraseEdit(int posY, string prompt, string caption, int cursor_position);
    void eraseLink(int posY, string caption, EAlignment justify);
    void eraseScroller(int posY, int scrollposition, int scrollSize);
    void eraseCheckBox(int posY, string caption, EAlignment justify);
    void eraseEditBox(int posY, int lines, string prompt, string caption, int cursor_position);
    
    // advanced drawing interface...
    void drawChar(int posX, int posY, char index);
    void eraseChar(int posX, int posY);

    void drawChar(int posX, int posY, ESymbol symbol);


    void drawCheckMark(int posX, int posY, bool checkedFlag);
    void eraseCheckMark(int posX, int posY);

    void drawSelection(int position, int wide);
    void eraseSelection(int position, int wide);
  }


} // namespace MenuDesigner
